package com.example.aaa_viewpager.entity;

import android.content.ContentValues;

public class User {
	private int id;
	private String name;
	private String address;
	private String phone;
	private int price_1;
	private int price_2;
	private int price_3;
	private byte[] picture;
	private String geo;
	
	public User(int id)
	{
		this.id = id;
	}
	
	public User(int id,String name,String address,String phone, int price_1, int price_2, int price_3, byte[] picture)
	{
		super();
		this.id = id;
		this.name = name;
		this.address = address;
		this.phone = phone;
		this.price_1 = price_1;
		this.price_2 = price_2;
		this.price_3 = price_3;
		this.picture = picture;
		
	}
	
	public User(int id, String name, String address, byte[] picture) 
	{
		super();
		this.id = id;
		this.name = name;
		this.address = address;
		this.picture = picture;
	}

	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public int getPrice_1() {
		return price_1;
	}
	public void setPrice_1(int price_1) {
		this.price_1 = price_1;
	}
	public int getPrice_2() {
		return price_2;
	}
	public void setPrice_2(int price_2) {
		this.price_2 = price_2;
	}
	public int getPrice_3() {
		return price_3;
	}
	public void setPrice_3(int price_3) {
		this.price_3 = price_3;
	}
	public byte[] getPicture() {
		return picture;
	}
	public void setPicture(byte[] picture) {
		this.picture = picture;
	}
	public String toString()
	{
		/*return String.format("%d.%s%n"+"地址 :"+"%s%n"+"電話 :"+"%s%n"+"定價 :"+"%d%n"+"假日價 :"+"%d%n" +
	"平日價 :"+"%d",id,name,address,phone,price_1,price_2,price_3 );*/
		
		//return String.format("%s\n%s",name,address );
		return String.format("%s",name );
	}
	public String getGeo() {
		return geo;
	}

	public void setGeo(String geo) {
		this.geo = geo;
	}
	public ContentValues toContentValues()
	{
		ContentValues data = new ContentValues();
		//data.put("_ID", this.id);// 這個不需要，因為database會自動建立
		data.put("NAME", this.name);
		data.put("ADDRESS", this.address);
		data.put("PHONE", this.phone);
		data.put("PRICE_1", this.price_1);
		data.put("PRICE_2", this.price_2);
		data.put("PRICE_3", this.price_3);
		return data;	
	}

	
}
